
import Request from '../util/request'

export default class Shop extends Request {

  // 获取资料
  getInfo(data) {
    return this.request({
      url: '/h5/shop/get-info',
      data
    })
  }

  _getOpenidH5(data) {
    return this.request({
      url: '/h5/shop/get-openid',
      data
    })
  }

  get(data) {
    return this.request({
      url: '/h5/shop/get',
      data
    })
  }

  // 订单
  getOrderList(data) {
    return this.request({
      url: '/h5/shop/order',
      data
    })
  }

  getProduct(data) {
    return this.request({
      url: '/h5/shop/product',
      data
    })
  }

  getCategory(data) {
    return this.request({
      url: '/h5/shop/category',
      data
    })
  }

  getMenu(data) {
    return this.request({
      url: '/h5/shop/menu',
      data
    })
  }

  // 保存分类文字
  saveCategoryText(data) {
    return this.request({
      url: '/h5/shop/save-category-name',
      data
    })
  }

  // 保存商品标题
  saveProductText(data) {
    return this.request({
      url: '/h5/shop/save-product-name',
      data
    })
  }

}
